﻿using System;

namespace BaseSyntax.Values
{
	// 
	public class PrintAccuracy:ITest
	{
		public void Test()
		{
			double d = 1.618033988749895;
			
			string text1 = $"{d}";
			
			//round-trip 
			string text2 = string.Format("{0:R}", d);
			
			//1.61803398874989
			Console.WriteLine($"{text1}");
			//false
			Console.WriteLine($"{d == double.Parse(text1)}");
			
			//1.6180339887498949
			Console.WriteLine($"{text2}");
			//true
			Console.WriteLine($"{d == double.Parse(text2)}");
		}
	}
}